package com.bupt.smart.network.api;

import com.bupt.smart.model.RepairRequest;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by ght on 2016/4/13.
 */
public interface RepairAPI {
    @GET("users/{id}/repairs")
    Call<List<RepairRequest>> getRepairHistory(@Path("id") int userID, @Query("status") int status, @Query("page") int page, @Query("pagesize") int size);

    @POST("users/{id}/repairs")
    Call<Map<String, Boolean>> submitRepairRequest(@Path("id") int userID, @Body RepairRequest repairRequest);
}
